import requset from '@/api/request'

// /lejuAdmin/productArticle/findArticles/{start}/{limit}
// es6 形参默认值写法  start = 1, limit = 10
export function findArticles(start = 1, limit = 10, data) {
  return requset({
    url: `/lejuAdmin/productArticle/findArticles/${start}/${limit}`,
    method: 'POST',
    data
  })
}
//  新增
export function addArticle(data) {
  return requset({
    url: `/lejuAdmin/productArticle/addArticle`,
    method: 'POST',
    data
  })
}
// 获取明细
export function productArticle(id) {
  return requset({
    url: `/lejuAdmin/productArticle/productArticle/${id}`
  })
}
// 更新
export function updateArticle(data) {
  return requset({
    url: `/lejuAdmin/productArticle/updateArticle`,
    method: 'POST',
    data
  })
}

